package javab;

import javax.xml.crypto.dsig.spec.DigestMethodParameterSpec;

import DB.DBUtil;

public class User {
	private String id;
	private String name;
	private int balance;
	private String password;
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getBalance() {
		return balance;
	}
	public void setBalance(int balance) {
		this.balance = balance;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	
	public void saveBalance(int balance) {
		DBUtil db=new DBUtil();
		db.updateAdd(balance, this.id);
	}
	
	public void drawBalance(int balance) {
		DBUtil db=new DBUtil();
		db.updateless(balance, this.id);
	}
	
}
